import http from "@/api";

import { ResPage } from "@/api/interface";
import { OptionVo } from "@/biz/interface";

import { WorkSkillTagsEntity, WorkSkillTagsVo } from "@/biz/interface/WorkType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取工友的技能标签列表
export const getWorkSkillTagsVoListApi = (params: {}) => {
  return http.post<ResPage<WorkSkillTagsVo>>(moduleUrl + `/syswk/wksktagvolist`, params);
};

// * 获取工友的技能标签下拉选择
export const getWorkSkillTagsDropApi = (params: {}) => {
  return http.post<ResPage<OptionVo>>(moduleUrl + `/syswk/wksktagdrop`, params);
};

// * 新增工友的技能标签接口
export const saveWorkSkillTagsApi = (workSkillTags: WorkSkillTagsEntity) => {
  return http.post(moduleUrl + `/syswk/wksktagsave`, workSkillTags);
};

// * 详情工友的技能标签接口
export const getWorkSkillTagsInfoApi = (params: { id: string }) => {
  return http.post<WorkSkillTagsEntity>(moduleUrl + `/syswk/wksktaginfo`, params);
};

// * 删除工友的技能标签接口
export const deleteWorkSkillTagsApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/syswk/wksktagdelete`, params);
};

// * 修改工友的技能标签状态接口
export const changeFlagActiveApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/syswk/wksktagactive`, params);
};
